<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Accessory</title>
<style type="text/css" rel="stylesheet">
    body {
    font-size:12px;
    margin: 0px;
    background-color:#F0F0EE;
    overflow: hidden;
    }
    td.left1 {
    font-size:12px;
    }
    td.right1 {
    font-size:12px;
    }
    td.left2 {
    font-size:12px;
    width: 35px;
    padding: 2px;
    }
    td.right2 {
    font-size:12px;
    padding: 2px;
    width: 50px;
    }
</style>
<script type="text/javascript">
    function changeType(obj) {
        var url = document.getElementById('url');
        var imgFile = document.getElementById('imgFile');
        var trRemark = document.getElementById('trRemark');        
        if (obj.value == 1) { //
            url.style.display = 'none';
            imgFile.style.display = 'block';
            trRemark.style.display = 'none';
        } else {
            url.style.display = 'block';
            imgFile.style.display = 'none';
            trRemark.style.display = 'block';
        }
    }
</script>
</head>
<body>
<form name="uploadForm" method="post" enctype="multipart/form-data" action="../accessory_upload_json.ashx">
    <input type="hidden" id="editorId" name="id" value="" />
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td class="left1">
          <select id="type" name="type" onchange="changeType(this);">
              <option value="1" selected="selected">本地上传</option>
              <option value="2">远程上传</option>
          </select>
        </td>
      </tr>
	  <td class="right1">
          <input type="file" id="imgFile" name="imgFile" style="width:220px;" />
          <input type="text" id="url" name="url" value="http://" maxlength="255" style="width:220px;display:none;" />
      </td>
      <tr id="trRemark" style="display:none;">
        <td class="left1" align="right">说明</td>
        <td class="right1"><input type="text" id="imgTitle" name="imgTitle" value="附件" maxlength="100" style="width:220px;" /></td>
      </tr>
    </table>
</form>
</body>
</html>